package com.company.queue;

import java.util.LinkedList;

// 队列，先进先出
public class QueueL {
    private LinkedList list = new LinkedList();

    public void put(Object v) {
        list.addFirst(v);
    }

    public Object get() {
        return list.removeLast();
    }

    public boolean isEmpty() {
        return list.isEmpty();
    }

    @Override
    public String toString() {
        return list.toString();
    }
}
